package lhl.vo;

import com.ejlchina.searcher.bean.DbField;
import com.ejlchina.searcher.bean.SearchBean;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDate;

/**
 * <p>
 *
 * </p>
 *
 * @author LHL
 * @since 2021-08-07
 */
@Data
@EqualsAndHashCode(callSuper = false)

/**
 * @SearchBean 直接写到vo上 查询返回的可以直接到前端,  关联表查询时 vo的每一个字段都需要 @DbField 指定映射sql中的字段  指定了才会拼接到查询的sql中
 */
@SearchBean(tables = "table_test t1 left join table_name1 t2 on t1.column_1 = t2.column_1")
public class Table_testVo implements Serializable {

	@DbField(value = "t1.column_1")
	private Long column_1;
	@DbField(value = "t1.column_2")
	private String column_2;

	private Double column_3;

	private LocalDate column_4;

	@DbField(value = "t2.column_2") //把数据库 t2.column_2 赋值给t2.column_2
	private String column_5;


}
